import request from '@/utils/request';

export async function getMasterPlanByPage(params: any) {
  return request('/api/project/getMasterPlanByPage', {
    method: 'POST',
    data: params,
  });
}

//获取项目主计划/api/project/getMasterPlanAndStageByPage
export async function getMasterPlanAndStageByPage(params: any) {
  return request('/api/project/getMasterPlanAndStageByPage', {
    method: 'POST',
    data: params,
  });
}

export async function updateMasterPlan(params: any) {
  return request('/api/project/updateMasterPlan', {
    method: 'POST',
    data: params,
  });
}
//计划编辑/api/project/getMasterPlanByPageAndInfoId
export async function getMasterPlanByPageAndInfoId(params: any) {
  return request('/api/project/getMasterPlanByPageAndInfoId', {
    method: 'POST',
    data: params,
  });
}

export async function addMasterPlan(params: any) {
  return request('/api/project/addMasterPlan', {
    method: 'POST',
    data: params,
  });
}

export async function delMasterPlan(params: any) {
  return request('/api/project/delMasterPlan', {
    method: 'POST',
    data: params,
  });
}

///api/project/updateMasterPlanStageTime
export async function updateMasterPlanStageTime(params: any) {
  return request('/api/project/updateMasterPlanStageTime', {
    method: 'POST',
    data: params,
  });
}

export default { getMasterPlanByPage, addMasterPlan, updateMasterPlan, delMasterPlan };
